Avoid parsing skipped range requests in ChunkedStreamManager (PR 10694 follow-up)#20652
Draft
Snuffleupagus wants to merge 1 commit intomozilla:masterfrom
Draft
Avoid parsing skipped range requests in ChunkedStreamManager (PR 10694 follow-up)#20652Snuffleupagus wants to merge 1 commit intomozilla:masterfrom
ChunkedStreamManager (PR 10694 follow-up)#20652Snuffleupagus wants to merge 1 commit intomozilla:masterfrom
Conversation
…694 follow-up) While we don't dispatch the actual range request after PR 10694 we still parse the returned data, which ends up being an *empty* `ArrayBuffer` and thus cannot affect the `ChunkedStream.prototype._loadedChunks` property. Given that no actual data arrived, it's thus pointless[1] to invoke the `ChunkedStreamManager.prototype.onReceiveData` method in this case (and it also avoids sending effectively duplicate "DocProgress" messages). --- [1] With the *possible* exception of `disableAutoFetch === false` being set, see https://github.com/mozilla/pdf.js/blob/f24768d7b4ef0f64976a7f9e80e15ef50c759356/src/core/chunked_stream.js#L499-L517 however that never happens when streaming is being used; note https://github.com/mozilla/pdf.js/blob/f24768d7b4ef0f64976a7f9e80e15ef50c759356/src/core/worker.js#L237-L238
Collaborator
Author
|
/botio test |
Collaborator
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/da63b1de95195a6/output.txt |
Collaborator
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/71aa23b7d82a447/output.txt |
Collaborator
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/71aa23b7d82a447/output.txt Total script time: 60.00 mins |
Collaborator
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/da63b1de95195a6/output.txt Total script time: 81.62 mins
Image differences available at: http://54.193.163.58:8877/da63b1de95195a6/reftest-analyzer.html#web=eq.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While we don't dispatch the actual range request after PR #10694 we still parse the returned data, which ends up being an empty
ArrayBufferand thus cannot affect theChunkedStream.prototype._loadedChunksproperty.Given that no actual data arrived, it's thus pointless[1] to invoke the
ChunkedStreamManager.prototype.onReceiveDatamethod in this case (and it also avoids sending effectively duplicate "DocProgress" messages).[1] With the possible exception of
disableAutoFetch === falsebeing set, seepdf.js/src/core/chunked_stream.js
Lines 499 to 517 in f24768d
pdf.js/src/core/worker.js
Lines 237 to 238 in f24768d